﻿
@model LandPortMoblieWeb.Models.User


@{
    ViewBag.Title = "登录";
}

@section Header {
  
    <h1>@ViewBag.Title</h1>
}
<script type="text/javascript">
    function xian(data)
    {
        if (data == "success")
        {
            window.location.href = "/Home/Index";
            return false;
        }
        var cc = $("#ErrorMange").children("ul").children("li");
        if (cc.length > 1) {
            $.each(cc, function (i, v) {
                if (i == 0) {
                    $(v).show().text(data);
                }
                else {
                    $(v).remove();
                }
            })
        }
        else {
            cc.show().text(data);
        }           
    }

</script>

@using (Ajax.BeginForm("Login", new AjaxOptions { HttpMethod="POST",OnSuccess = "xian" }))
{
    
     @Html.AntiForgeryToken()
     @Html.ValidationSummary(false,"", new { style = "color:red", id = "ErrorMange" })
    var uid = ViewBag.telmessage;

    <div class="ui-grid-a">
        <div class="ui-block-a " style=" width: 25%; height: 54px; line-height: 54px; text-align: center;">
            用 户 名：
        </div>
        <div class="ui-block-b" style="width:75%">
            @Html.TextBoxFor(m => m.LoginName, new { Value = uid })                  
        </div>
    </div>
    <div class="ui-grid-a">
        <div class="ui-block-a" style=" width: 25%; height: 54px; line-height: 54px; text-align: center;">
            密&nbsp;&nbsp;&nbsp;&nbsp; 码：
        </div>
        <div class="ui-block-b" style="width:75%">
            @Html.PasswordFor(m => m.Password)
        </div>
    </div>
    <button class="ui-btn ui-corner-all" style="background-color:blanchedalmond" id="log" data-ajax="false" type="submit" rel="external">登录</button>

}

